﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Collections.Generic;

namespace Corina.Lantern.Hub.Viewmodels
{
    public class StatisticViewmodel : ViewmodelBase
    {
        public IEnumerable<KeyValuePair<int, int>> LinesKVP
        {
            get {
                Random ran = new Random();

                for (var i = 0; i < 20; i++)
                {
                    yield return new KeyValuePair<int, int>(i, ran.Next(100));
                }
            }
        }

        private string _seletedMeasure = "二价铜";
        public string SelectedMeasure
        {
            get { return _seletedMeasure; }
            set {
                _seletedMeasure = value;
                RaisePropertyChanged(() => SelectedMeasure);
                RaisePropertyChanged(() => LinesKVP);
            }
        }

        public IEnumerable<string> MeasureObjectCollection
        {
            get
            {
                yield return "二价铜";
                yield return "亚硝酸盐";
                yield return "双氧水";
                yield return "二价铁";
                yield return "氨氮";
                yield return "碘";
                yield return "砷";
                yield return "钴";
                yield return "六价铬";
                yield return "镉";
                yield return "二氧化硫";
                yield return "铅";
            }
        }
    }
}
